\(\int (d+e x)^2 (a+b x+c x^2) \, dx\) [2109]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 69 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=\frac {\left (c d^2-b d e+a e^2\right ) (d+e x)^3}{3 e^3}-\frac {(2 c d-b e) (d+e x)^4}{4 e^3}+\frac {c (d+e x)^5}{5 e^3} \]

[Out]

1/3*(a*e^2-b*d*e+c*d^2)*(e*x+d)^3/e^3-1/4*(-b*e+2*c*d)*(e*x+d)^4/e^3+1/5*c*(e*x+d)^5/e^3

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {712} \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=\frac {(d+e x)^3 \left (a e^2-b d e+c d^2\right )}{3 e^3}-\frac {(d+e x)^4 (2 c d-b e)}{4 e^3}+\frac {c (d+e x)^5}{5 e^3} \]

[In]

Int[(d + e*x)^2*(a + b*x + c*x^2),x]

[Out]

((c*d^2 - b*d*e + a*e^2)*(d + e*x)^3)/(3*e^3) - ((2*c*d - b*e)*(d + e*x)^4)/(4*e^3) + (c*(d + e*x)^5)/(5*e^3)

Rule 712

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\left (c d^2-b d e+a e^2\right ) (d+e x)^2}{e^2}+\frac {(-2 c d+b e) (d+e x)^3}{e^2}+\frac {c (d+e x)^4}{e^2}\right ) \, dx \\ & = \frac {\left (c d^2-b d e+a e^2\right ) (d+e x)^3}{3 e^3}-\frac {(2 c d-b e) (d+e x)^4}{4 e^3}+\frac {c (d+e x)^5}{5 e^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.06 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=a d^2 x+\frac {1}{2} d (b d+2 a e) x^2+\frac {1}{3} \left (c d^2+2 b d e+a e^2\right ) x^3+\frac {1}{4} e (2 c d+b e) x^4+\frac {1}{5} c e^2 x^5 \]

[In]

Integrate[(d + e*x)^2*(a + b*x + c*x^2),x]

[Out]

a*d^2*x + (d*(b*d + 2*a*e)*x^2)/2 + ((c*d^2 + 2*b*d*e + a*e^2)*x^3)/3 + (e*(2*c*d + b*e)*x^4)/4 + (c*e^2*x^5)/
5

Maple [A] (verified)

Time = 2.52 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.01

method result size
default \(\frac {c \,e^{2} x^{5}}{5}+\frac {\left (e^{2} b +2 c d e \right ) x^{4}}{4}+\frac {\left (e^{2} a +2 b d e +c \,d^{2}\right ) x^{3}}{3}+\frac {\left (2 a d e +b \,d^{2}\right ) x^{2}}{2}+x a \,d^{2}\) \(70\)
norman \(\frac {c \,e^{2} x^{5}}{5}+\left (\frac {1}{4} e^{2} b +\frac {1}{2} c d e \right ) x^{4}+\left (\frac {1}{3} e^{2} a +\frac {2}{3} b d e +\frac {1}{3} c \,d^{2}\right ) x^{3}+\left (a d e +\frac {1}{2} b \,d^{2}\right ) x^{2}+x a \,d^{2}\) \(70\)
gosper \(\frac {1}{5} c \,e^{2} x^{5}+\frac {1}{4} x^{4} e^{2} b +\frac {1}{2} x^{4} c d e +\frac {1}{3} x^{3} e^{2} a +\frac {2}{3} x^{3} b d e +\frac {1}{3} c \,d^{2} x^{3}+a d e \,x^{2}+\frac {1}{2} b \,d^{2} x^{2}+x a \,d^{2}\) \(76\)
risch \(\frac {1}{5} c \,e^{2} x^{5}+\frac {1}{4} x^{4} e^{2} b +\frac {1}{2} x^{4} c d e +\frac {1}{3} x^{3} e^{2} a +\frac {2}{3} x^{3} b d e +\frac {1}{3} c \,d^{2} x^{3}+a d e \,x^{2}+\frac {1}{2} b \,d^{2} x^{2}+x a \,d^{2}\) \(76\)
parallelrisch \(\frac {1}{5} c \,e^{2} x^{5}+\frac {1}{4} x^{4} e^{2} b +\frac {1}{2} x^{4} c d e +\frac {1}{3} x^{3} e^{2} a +\frac {2}{3} x^{3} b d e +\frac {1}{3} c \,d^{2} x^{3}+a d e \,x^{2}+\frac {1}{2} b \,d^{2} x^{2}+x a \,d^{2}\) \(76\)

[In]

int((e*x+d)^2*(c*x^2+b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/5*c*e^2*x^5+1/4*(b*e^2+2*c*d*e)*x^4+1/3*(a*e^2+2*b*d*e+c*d^2)*x^3+1/2*(2*a*d*e+b*d^2)*x^2+x*a*d^2

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=\frac {1}{5} \, c e^{2} x^{5} + \frac {1}{4} \, {\left (2 \, c d e + b e^{2}\right )} x^{4} + a d^{2} x + \frac {1}{3} \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} x^{3} + \frac {1}{2} \, {\left (b d^{2} + 2 \, a d e\right )} x^{2} \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

1/5*c*e^2*x^5 + 1/4*(2*c*d*e + b*e^2)*x^4 + a*d^2*x + 1/3*(c*d^2 + 2*b*d*e + a*e^2)*x^3 + 1/2*(b*d^2 + 2*a*d*e
)*x^2

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.06 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=a d^{2} x + \frac {c e^{2} x^{5}}{5} + x^{4} \left (\frac {b e^{2}}{4} + \frac {c d e}{2}\right ) + x^{3} \left (\frac {a e^{2}}{3} + \frac {2 b d e}{3} + \frac {c d^{2}}{3}\right ) + x^{2} \left (a d e + \frac {b d^{2}}{2}\right ) \]

[In]

integrate((e*x+d)**2*(c*x**2+b*x+a),x)

[Out]

a*d**2*x + c*e**2*x**5/5 + x**4*(b*e**2/4 + c*d*e/2) + x**3*(a*e**2/3 + 2*b*d*e/3 + c*d**2/3) + x**2*(a*d*e +
b*d**2/2)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=\frac {1}{5} \, c e^{2} x^{5} + \frac {1}{4} \, {\left (2 \, c d e + b e^{2}\right )} x^{4} + a d^{2} x + \frac {1}{3} \, {\left (c d^{2} + 2 \, b d e + a e^{2}\right )} x^{3} + \frac {1}{2} \, {\left (b d^{2} + 2 \, a d e\right )} x^{2} \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

1/5*c*e^2*x^5 + 1/4*(2*c*d*e + b*e^2)*x^4 + a*d^2*x + 1/3*(c*d^2 + 2*b*d*e + a*e^2)*x^3 + 1/2*(b*d^2 + 2*a*d*e
)*x^2

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.09 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=\frac {1}{5} \, c e^{2} x^{5} + \frac {1}{2} \, c d e x^{4} + \frac {1}{4} \, b e^{2} x^{4} + \frac {1}{3} \, c d^{2} x^{3} + \frac {2}{3} \, b d e x^{3} + \frac {1}{3} \, a e^{2} x^{3} + \frac {1}{2} \, b d^{2} x^{2} + a d e x^{2} + a d^{2} x \]

[In]

integrate((e*x+d)^2*(c*x^2+b*x+a),x, algorithm="giac")

[Out]

1/5*c*e^2*x^5 + 1/2*c*d*e*x^4 + 1/4*b*e^2*x^4 + 1/3*c*d^2*x^3 + 2/3*b*d*e*x^3 + 1/3*a*e^2*x^3 + 1/2*b*d^2*x^2
+ a*d*e*x^2 + a*d^2*x

Mupad [B] (verification not implemented)

Time = 9.75 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00 \[ \int (d+e x)^2 \left (a+b x+c x^2\right ) \, dx=x^3\,\left (\frac {c\,d^2}{3}+\frac {2\,b\,d\,e}{3}+\frac {a\,e^2}{3}\right )+x^2\,\left (\frac {b\,d^2}{2}+a\,e\,d\right )+x^4\,\left (\frac {b\,e^2}{4}+\frac {c\,d\,e}{2}\right )+\frac {c\,e^2\,x^5}{5}+a\,d^2\,x \]

[In]

int((d + e*x)^2*(a + b*x + c*x^2),x)

[Out]

x^3*((a*e^2)/3 + (c*d^2)/3 + (2*b*d*e)/3) + x^2*((b*d^2)/2 + a*d*e) + x^4*((b*e^2)/4 + (c*d*e)/2) + (c*e^2*x^5
)/5 + a*d^2*x